home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / text / edit / GED_Hexedit.lha / GED_Hexedit / hex / deutsch / searchbytes.ged < prev   
Text File  |  1997-11-13  |  2KB  |  2 lines

  1. /* Optimized with RexxOpt 1.8 */
  2. OPTIONS RESULTS;if (LEFT(ADDRESS(),6) ~="GOLDED") then;address 'GOLDED.1';'LOCK CURRENT RELEASE=4';if (RC ~=0) then;exit;OPTIONS FAILAT 6;SIGNAL ON SYNTAX;'QUERY Var=Suchbytes Name=Find';parse arg start;if start=1 then;do;'REQUEST Body="Bytes im Hexformat eingeben (max 16 Bytes):" Title="Eingabe" Button="OK|Abbrechen" Var=Suchbytes Min=2 Max=32 String Old=' Suchbytes;if RC>0 then;do;'UNLOCK';exit;end;end;if length(Suchbytes)=0|length(Suchbytes)//2 ~=0 then;do;'REQUEST Body="Es sind jeweils paarweise Hexziffern einzugeben" Title="Fehler" Button="OK"';'UNLOCK';exit;end;Suchbytes=Upper(Suchbytes);if verify(Suchbytes,'0123456789ABCDEF')~=0 then;do;'REQUEST Body="Es sind nur Hexziffern (0...9 oder a...f) einzugeben" Title="Fehler" Button="OK"';'UNLOCK';exit;end;'QUERY Var=Startzeile Name=Line';'QUERY Var=Startspalte Name=Column';Z1=Startzeile;S1=Startspalte;Byteanz=length(Suchbytes)/2;Actbyte=left(Suchbytes,2);'QUERY Var=Anzzeilen Name=Lines';do forever;'FIND Next Quiet String='Actbyte;'QUERY Var=Z2 Name=Line';'QUERY Var=S2 Name=Column';if Z1=Z2&S1=S2 then;do;'GOTO Line='Startzeile;'GOTO Column='Startspalte;'REQUEST Body="Suchbegriff wurde nicht gefunden" Title="Ergebnis" Button="OK"';'SET Name=Find Value='Suchbytes;'UNLOCK';exit;end;if S2=11|S2=13|S2=15|S2=17|S2=20|S2=22|S2=24|S2=26|S2=29|S2=31|S2=33|S2=35|S2=38|S2=40|S2=42|S2=44 then;do;if Byteanz=1 then;do;'SET Name=Find Value='Suchbytes;'UNLOCK';exit;end;'QUERY Var=Inhalt Name=Buffer';t1=substr(Inhalt,S2,46-S2);t1=compress(t1);if length(t1)/2<Byteanz then;do;if Z2<Anzzeilen then;do;'DOWN';'QUERY Var=Inhalt Name=Buffer';'UP';'GOTO Column='S2;t=Byteanz-length(t1)/2;t2=compress(substr(Inhalt,11,2*t));t1=t1||t2;if t1=Suchbytes then;do;'SET Name=Find Value='Suchbytes;'UNLOCK';exit;end;end;end;else;do;if Suchbytes=left(t1,length(Suchbytes)) then;do;'SET Name=Find Value='Suchbytes;'UNLOCK';exit;end;end;end;Z1=Z2;S1=S2;end;SYNTAX:;SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-(";'UNLOCK';exit